// 封装组织相关请求模块
import request from '@/utils/request'


// 获取部门数据
export const getDepartmentList = () => {
    return request.get('/company/department')
}

// 获取部门负责人数据
export const getDepManageList = () => {
    return request.get('/sys/user/simple')
} 

// 添加子部门接口
export const addDepartment = (data) => {
    return request.post('/company/department', data)
}

// 获取部门详情接口

export const getDepartmentDetail = (id) => {
    return request.get(`/company/department/${id}`)
}

// 更新部门接口
export const updateDepartment  = (data) => {
    return request.put(`/company/department/${data.id}`, data)
}

// 删除部门接口
export const deleteDepartment = (id) => {
    return request.delete(`/company/department/${id}`)
}